/* Author: Avinash Krishna */
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define llmax LONG_LONG_MAX
#define llmin LONG_LONG_MIN
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define yes cout<<"YES"<<"\n"
#define no cout<<"NO"<<"\n"
#define endl '\n'
#define arrina ll a[n];for(int i=0;i<n;i++){cin>>a[i];}
#define arrinb ll b[n];for(int i=0;i<n;i++){cin>>b[i];}
const ll mod=1000000007;
ll binpow(ll a, ll b) {if (b == 0)return 1;ll res = binpow(a, b / 2);if (b % 2) return res * res * a; else return res * res;}
ll binpowmod(ll a, ll b, ll m) {a %= m;ll res = 1; while (b > 0) {if (b & 1)res = res * a % m;a = a * a % m;b >>= 1;}return res;}
ll gcd(ll a,ll b){if(b>a){return gcd(b,a);}if(b==0){return a;}return gcd(b,a%b);}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}
ll c1s(string s){ll c=0;for(int i=0;i<s.size();i++){if(s[i]=='1')c++;}return c;}
ll c0s(string s){ll c=0;for(int i=0;i<s.size();i++){if(s[i]=='0')c++;}return c;}
bool isPrime(int n){if (n <= 1)return false;for (int i = 2; i * i <= n; i++) {if (n % i == 0) return false;}return true;}
bool isSquare(long double x){if (x >= 0) {long long sr = sqrt(x); return (sr * sr == x);} return false;}
bool isPalindrome(string &s, int low, int high) {while (low < high) {if (s[low++] != s[high--]) return false;}return true;}
ll binarySearch(ll arr[], ll l, ll r, ll x){while (l <= r) {ll m = l + (r - l) / 2;if (arr[m] == x)return m;if (arr[m] < x)l = m + 1;else r = m - 1;}return -1;}
int main(void){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t;
// t=1;
cin>>t;
while(t--){
ll n;
cin>>n;
ll p = (ll)log2(n);
cout<<binpow(2, p)<<endl;
end:;
}
}
1598B - Groups | 1602B - Divine Array |
1594B - Special Numbers | 1614A - Divan and a Store |
2085. Count Common Words With One Occurrence | 2089. Find Target Indices After Sorting Array |
2090. K Radius Subarray Averages | 2091. Removing Minimum and Maximum From Array |
6. Zigzag Conversion | 1612B - Special Permutation |
1481. Least Number of Unique Integers after K Removals | 1035. Uncrossed Lines |
328. Odd Even Linked List | 1219. Path with Maximum Gold |
1268. Search Suggestions System | 841. Keys and Rooms |
152. Maximum Product Subarray | 337. House Robber III |
869. Reordered Power of 2 | 1593C - Save More Mice |
1217. Minimum Cost to Move Chips to The Same Position | 347. Top K Frequent Elements |
1503. Last Moment Before All Ants Fall Out of a Plank | 430. Flatten a Multilevel Doubly Linked List |
1290. Convert Binary Number in a Linked List to Integer | 1525. Number of Good Ways to Split a String |
72. Edit Distance | 563. Binary Tree Tilt |
1306. Jump Game III | 236. Lowest Common Ancestor of a Binary Tree |